package com.coder.baseapp;

import android.app.Application;

import com.coder.baseapp.injecter.components.ApplicationComponent;
import com.coder.baseapp.injecter.components.DaggerApplicationComponent;
import com.coder.baseapp.injecter.module.ApplicationModule;

/**
 * Application
 * *
 *
 * @Author: Tua.CoderGui
 * *
 * @Date: 2017/3/9
 * *
 * Copyright (c) 2017 All Rights Reserved.
 */

public class App extends Application {

    private static ApplicationComponent mApplicationComponent;

    public static ApplicationComponent getAppComponent() {
        return mApplicationComponent;
    }

    @Override
    public void onCreate() {
        super.onCreate();

        //注入全局
        _injecter();

    }

    public void _injecter() {
        mApplicationComponent = DaggerApplicationComponent.builder()
                .applicationModule(new ApplicationModule(this))
                .build();
    }
}
